package com.wx;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.stereotype.Component;

import com.wx.service.CommonService;

@Component
public class InitRedisCache implements ApplicationRunner {

	@Autowired
	private CommonService commonService;
	
	@Override
	public void run(ApplicationArguments args) throws Exception {
		commonService.initAddressRedisCache();
		commonService.initGoodsPropertiesCache();
		commonService.initGoodsPropertyCache();
		commonService.initGoodsPriceCache();
	}

}
